Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Determining the Lengths of Vectors

QuickDraw 3D provides routines that you can use to determine the length of a vector.

Q3Vector2D_Length

You can use the Q3Vector2D_Length function to determine the length of a two-dimensional vector.

float Q3Vector2D_Length (const TQ3Vector2D *vector2D);
vector2D
A two-dimensional vector.

DESCRIPTION

The Q3Vector2D_Length function returns, as its function result, the length of the vector vector2D .

Q3Vector3D_Length

You can use the Q3Vector3D_Length function to determine the length of a three-dimensional vector.

float Q3Vector3D_Length (const TQ3Vector3D *vector3D);
vector3D
A three-dimensional vector.

DESCRIPTION

The Q3Vector3D_Length function returns, as its function result, the length of the vector vector3D .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |